Creating multiple dialog boxes

I am trying to create multiple dialog boxes. The first is meant to gather information from the user and execute some DXL code.

After the code has been processed I would like to create a new dialog box with a text area in order to display the results in a clean and formatted fashion. At this point I do not care about whether I close the original dialog box or not.

I am unable to create this new dialog box. Does anyone have suggestions to help me out?

Keeping this simple:

DB db1 = centered "Welcome to Example"
canvas(db1, 600, 100, dbe_logo_draw) // Logo

show db1
hide db1
release db1
destroy db1
db1 = null

DB db2 = centered "Second dialog box needed"
canvas(db2, 600, 100, dbe_logo_draw) // Logo
show db2
hide db2
release db2
destroy db2
db2 = null

Thanks for your knowledge
PatrickGuay - Thu Dec 01 10:17:07 EST 2011

Re: Creating multiple dialog boxes
OurGuest - Thu Dec 01 10:54:20 EST 2011

Instead of the first show you could use a block. Nothing happens after the first show.

There are other approaches but block is easy.

Re: Creating multiple dialog boxes
OurGuest - Thu Dec 01 15:17:16 EST 2011

In your client directory there are examples of using block. One example is: ddbintro.dxl

Re: Creating multiple dialog boxes
llandale - Thu Dec 01 16:38:48 EST 2011

Yes, no code executes after a "show".
  • show(db1)
  • infoBox("DXL Manual is wrong") // <- this never happens

Yes, code does run after a "block" when the DB is "released" and that code ends at the end of the callback.

Yes, db1 should be blocked followed by destroy followed by db2. The callbacks in db1 will need to put the results in some global variable so db2 can use it. The close callbacks would "release db1" but the default "OK" button does that for you.

db2 need not be blocked as its your final dialog; close it and you are done.

-Louie

The other option would be to have the callback in db1 hide and destroy db1 and then invoke db2; which does remove the need for the global results variable.

I would just have one dialog with two DBEs, one gathers and displays the raw and the next DBE displays it nicely. Or layer one over the other, first hiding the Nice and showing Raw, then hiding Raw and showing nice.